home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / tcp / clchat40.lha / CLChat40 / CLChat_Install next >
Text File  |  1995-05-04  |  8KB  |  243 lines

  1. ; CLChat Installer Robert Reiswig (rcr@netcom.com) ©1995
  2. ; For Oliver Wagner
  3. ; My Not be use in anyother release cept Aminet.. With out my asking.
  4.  
  5. ;********************************************************************
  6. ; Current Version of CLChat
  7. ;********************************************************************
  8. (set CLChatVer "4.0") 
  9. (set Client 0) ; For doing ONLY Server install for docs
  10. ;********************************************************************
  11. ; Info on CLChat & Installer Man
  12. ;********************************************************************
  13. (message "\nCLChatSystem V" CLChatVer " for AmiTCP ©1994-1995\nby:\n\n\nOliver Wagner\n\(o.wagner@pluribus.wupper.de)\n\n\n"
  14.          "\n\nInstaller by:\nRobert Reiswig (rcr@netcom.com)"
  15. )
  16.  
  17. ;********************************************************************
  18. ; MakeSure Amitcp is Installer
  19. ;********************************************************************
  20. (set #NeedAmiTCP (cat "CLChat needs AmiTCP to be installed."))
  21.  
  22. (if (< (exists ("Amitcp:")) 2)
  23.     (abort #NeedAmiTCP)       
  24. )  
  25.  
  26. ;********************************************************************
  27. ; Check for First Time install 
  28. ;********************************************************************
  29. (set there (askchoice (choices "Yes" "No")
  30.              (prompt "Is this your first time installing CLChat?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
  31.                                  "If No is selected, then the installer will NOT "
  32.                                  "(re)add entries to 'inetd.conf' & 'services' in the Amitcp:db drawer and 'startnet'.")
  33.                      (help   "Please Select: Updating or First Time Install")
  34.                    (default 0)
  35.       )
  36. )
  37.  
  38.  
  39. ;********************************************************************
  40. ; Ask Client and/or Server
  41. ;********************************************************************
  42. (set CS         (askoptions (choices "Client" "Server")
  43.                 (prompt "What parts of CLChat do you wish to install?")
  44.                 (help "What parts of CLChat do you wish to install?\nNote: You don't need the Server if you want to connect to a existing CLChatServer only.")
  45.                 (default 63)
  46.         )
  47. )
  48.  
  49. ;********************************************************************
  50. ; Copy over files for Client
  51. ;********************************************************************
  52. (if (IN CS 0)
  53.    (
  54.  
  55.     (set Client  (askdir (prompt "Please select where you wish to install the CLChat Client. A directory 'CLChat' will be created there!)")
  56.              (help   "Please select where you wish to install the CLChat Client. A directory 'CLChat' will be created there!)")
  57.              (default "Amitcp:")
  58.          )
  59.     ) 
  60.   
  61.     (if (< (exists (tackon Client "CLChat")) 2)
  62.       (makedir (tackon Client "CLChat") (infos))
  63.         
  64.     )
  65.  
  66.     (copyfiles (source "Client/CLChatGUI")  (dest (tackon Client "CLChat")) (infos))  
  67.  
  68.  
  69.     (set extras (askoptions (choices "Client Documentation")
  70.                 (prompt "Do you wish to copy over any of the following?")
  71.                 (help "Do you wish to copy over any of the following?")
  72.                 (default 63)
  73.         )
  74.     )
  75.  
  76.     (if (<> extras 0)
  77.        (
  78.   
  79.           (if (< (exists (tackon Client "CLChat/Docs")) 2)
  80.                (makedir (tackon Client "CLChat/Docs") (infos))
  81.          
  82.           )
  83.     
  84.  
  85.           (set where (tackon Client "CLChat/Docs"))
  86.  
  87.  
  88.           (if (IN extras 0)
  89.              (
  90.  
  91.                (copyfiles (source "Client/CLChatGUI.guide")  (dest (tackon Client "CLChat/Docs")) (infos))
  92.                (copyfiles (source "Client/CLChatGUI.doc")  (dest (tackon Client "CLChat/Docs")) (infos)) 
  93.                (copyfiles (source "Client/ReadMe.mui")  (dest (tackon Client "CLChat/Docs")) (infos))  
  94.      
  95.              )
  96.           )
  97.  
  98.        )
  99.     )
  100.  
  101.  
  102.  
  103.    )
  104.  
  105. )
  106.  
  107.  
  108. ;********************************************************************
  109. ; Copy over files for Server
  110. ;********************************************************************
  111. (if (IN CS 1)
  112.    (
  113.     
  114.   
  115.     (set cpu (database "cpu"))
  116.     (if (= cpu 68000) (set #cpu 0))
  117.     (if (= cpu 68010) (set #cpu 1))
  118.     (if (= cpu 68020) (set #cpu 2))
  119.     (if (= cpu 68030) (set #cpu 3))
  120.     (if (= cpu 68040) (set #cpu 4))
  121.     (if (= cpu 68060) (set #cpu 5))
  122.  
  123.     (set cpuPick (askchoice (choices "68000" "68010" "68020" "68030"
  124.                              "68040" "68060"
  125.                     )
  126.                 (prompt "Central Processing Unit Check")
  127.                         (help   "Central Processing Unit Check")
  128.                            (default #cpu)
  129.              )
  130.     )    
  131.  
  132.     (if (< cpu 68030) (copyfiles (source "Server/Bin/CLChatServer")  (dest "Amitcp:bin")) )
  133.     (if (> cpu 68020) (copyfiles (source "Server/Bin/CLChatServer030")  (dest "Amitcp:bin") (newname "CLChatServer") ) )
  134.    
  135.     (copyfiles (source "Server/serv/CLChatD")  (dest "Amitcp:serv"))
  136.     (copyfiles (source "Server/bin/CLChatLink")  (dest "Amitcp:bin"))
  137.  
  138.     (if (= there 0)
  139.      ( 
  140.  
  141.       (set port (asknumber (prompt "Please enter the port you wish\nto have the CLChat server on.\n"
  142.                                    "(5555 is the default.)")
  143.                            (help "Enter Port")
  144.                            (default 5555)            
  145.                 )
  146.       )
  147.       (textfile (dest "t:services.add") (append (cat "clchat          " port "/tcp\n")))
  148.       (rename "amitcp:db/services" "amitcp:db/services.CLChat.Backup")
  149.       (run ("join amitcp:db/services.CLChat.Backup t:services.add to amitcp:db/services"))
  150.  
  151.  
  152.       (textfile (dest "t:InetD.conf.add") (append "clchat    stream      tcp nowait root amitcp:serv/clchatd\n"))
  153.       (rename "amitcp:db/InetD.conf" "amitcp:db/InetD.conf.CLChat.Backup")
  154.       (run ("join amitcp:db/InetD.conf.CLChat.Backup t:InetD.conf.add to amitcp:db/InetD.conf"))
  155.  
  156.  
  157.       (textfile (dest "t:startnet.add") (append "run >NIL: AmiTCP:bin/CLChatServer\n"))
  158.       (rename "amitcp:bin/startnet" "amitcp:bin/startnet.CLChat.Backup")
  159.       (run ("join amitcp:bin/startnet.CLChat.Backup t:startnet.add to amitcp:bin/startnet"))
  160.  
  161.       
  162.  
  163.      )
  164.  
  165.     )
  166.  
  167.  
  168.    (set extras (askoptions (choices "Server Documentation" "Sample Bot")
  169.                 (prompt "Do you wish to copy over any of the following?")
  170.                 (help "Do you wish to copy over any of the following?")
  171.                 (default 63)
  172.         )
  173.     )
  174.  
  175.     (if (<> extras 0)
  176.        (
  177.           (if (= Client 0)  (set Client "Amitcp:"))
  178.              
  179.           (if (< (exists (tackon Client "CLChat")) 2)
  180.              (makedir (tackon Client "CLChat") (infos))
  181.           )
  182.          
  183.           (if (< (exists (tackon Client "CLChat/Docs")) 2)
  184.                (makedir (tackon Client "CLChat/Docs") (infos))
  185.          
  186.           )
  187.     
  188.  
  189.           (set where (tackon Client "CLChat/Docs"))
  190.  
  191.  
  192.           (if (IN extras 0)           
  193.              (copyfiles (source "CLChatServer.DOC")  (dest (tackon Client "CLChat/Docs")) (infos))
  194.           )
  195.  
  196.          
  197.           (if (IN extras 1)
  198.              (
  199.                (if (< (exists (tackon Client "CLChat/SampleBot")) 2)
  200.                   (makedir (tackon Client "CLChat/SampleBot") (infos))
  201.                )
  202.              
  203.                (copyfiles (source "Server/Bot")  (dest (tackon Client "CLChat/SampleBot")) (all))
  204.              )
  205.           )
  206.               
  207.           
  208.  
  209.  
  210.        )
  211.     )
  212.   
  213.  
  214.    )
  215. )
  216.  
  217.  
  218. ;********************************************************************
  219. ; Copy Extraa Demo stuff  
  220. ;********************************************************************
  221. (set extras     (askoptions (choices "Example ChatServer.MOTD" "Example ChatServer.OPList"
  222.                                      "Example ChatServer.Servers" "Example ChatServer.UserBans")
  223.                 (prompt "Do you wish to copy over any of the following Examples?")
  224.                 (help "Do you wish to copy over any of the following Examples?")
  225.                 (default 63)
  226.         )
  227. )
  228.  
  229.  
  230. (if (IN extras 0) (copyfiles (source "Server/db/ChatServer.MOTD")  (dest "Amitcp:db") (infos)) )
  231. (if (IN extras 1) (copyfiles (source "Server/db/ChatServer.OPList")  (dest "Amitcp:db") (infos)) )
  232. (if (IN extras 0) (copyfiles (source "Server/db/ChatServer.Servers")  (dest "Amitcp:db") (infos)) )
  233. (if (IN extras 1) (copyfiles (source "Server/db/ChatServer.UserBans")  (dest "Amitcp:db") (infos)) )
  234.  
  235.  
  236. ;********************************************************************
  237. ; Bye Bye  
  238. ;********************************************************************
  239. (set @default-dest Client) 
  240.  
  241.  
  242.